.class public Lcom/estrongs/android/pop/app/imageviewer/a;
.super Ljava/lang/Object;
.source "BitmapCache.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/estrongs/android/pop/app/imageviewer/a$a;
    }
.end annotation


# instance fields
.field private final a:Les/dm;

.field private final b:[Lcom/estrongs/android/pop/app/imageviewer/a$a;


# direct methods
.method public constructor <init>(Les/dm;I)V
    .locals 1

    .line 1
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 2
    iput-object p1, p0, Lcom/estrongs/android/pop/app/imageviewer/a;->a:Les/dm;

    .line 3
    new-array p1, p2, [Lcom/estrongs/android/pop/app/imageviewer/a$a;

    iput-object p1, p0, Lcom/estrongs/android/pop/app/imageviewer/a;->b:[Lcom/estrongs/android/pop/app/imageviewer/a$a;

    const/4 p1, 0x0

    .line 4
    :goto_0
    iget-object p2, p0, Lcom/estrongs/android/pop/app/imageviewer/a;->b:[Lcom/estrongs/android/pop/app/imageviewer/a$a;

    array-length v0, p2

    if-ge p1, v0, :cond_0

    .line 5
    new-instance v0, Lcom/estrongs/android/pop/app/imageviewer/a$a;

    invoke-direct {v0}, Lcom/estrongs/android/pop/app/imageviewer/a$a;-><init>()V

    aput-object v0, p2, p1

    add-int/lit8 p1, p1, 0x1

    goto :goto_0

    :cond_0
    return-void
.end method

.method private c(Les/cm;)Lcom/estrongs/android/pop/app/imageviewer/a$a;
    .locals 6

    const/4 v0, 0x0

    if-nez p1, :cond_0

    return-object v0

    .line 1
    :cond_0
    iget-object v1, p0, Lcom/estrongs/android/pop/app/imageviewer/a;->b:[Lcom/estrongs/android/pop/app/imageviewer/a$a;

    array-length v2, v1

    const/4 v3, 0x0

    :goto_0
    if-ge v3, v2, :cond_3

    aget-object v4, v1, v3

    .line 2
    iget-object v5, v4, Lcom/estrongs/android/pop/app/imageviewer/a$a;->a:Les/cm;

    if-ne p1, v5, :cond_2

    .line 3
    invoke-virtual {v4}, Lcom/estrongs/android/pop/app/imageviewer/a$a;->c()Z

    move-result p1

    if-eqz p1, :cond_1

    return-object v4

    .line 4
    :cond_1
    invoke-virtual {v4}, Lcom/estrongs/android/pop/app/imageviewer/a$a;->a()V

    goto :goto_1

    :cond_2
    add-int/lit8 v3, v3, 0x1

    goto :goto_0

    :cond_3
    :goto_1
    return-object v0
.end method


# virtual methods
.method public declared-synchronized a(Les/cm;)Lcom/estrongs/android/pop/app/imageviewer/h;
    .locals 1

    monitor-enter p0

    .line 1
    :try_start_0
    invoke-direct {p0, p1}, Lcom/estrongs/android/pop/app/imageviewer/a;->c(Les/cm;)Lcom/estrongs/android/pop/app/imageviewer/a$a;

    move-result-object p1

    if-eqz p1, :cond_1

    .line 2
    invoke-virtual {p1}, Lcom/estrongs/android/pop/app/imageviewer/a$a;->b()Lcom/estrongs/android/pop/app/imageviewer/h;

    move-result-object v0
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    if-eqz v0, :cond_0

    .line 3
    monitor-exit p0

    return-object v0

    .line 4
    :cond_0
    :try_start_1
    invoke-virtual {p1}, Lcom/estrongs/android/pop/app/imageviewer/a$a;->a()V
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    :cond_1
    const/4 p1, 0x0

    .line 5
    monitor-exit p0

    return-object p1

    :catchall_0
    move-exception p1

    monitor-exit p0

    throw p1
.end method

.method public declared-synchronized a()V
    .locals 4

    monitor-enter p0

    .line 16
    :try_start_0
    iget-object v0, p0, Lcom/estrongs/android/pop/app/imageviewer/a;->b:[Lcom/estrongs/android/pop/app/imageviewer/a$a;

    array-length v1, v0

    const/4 v2, 0x0

    :goto_0
    if-ge v2, v1, :cond_0

    aget-object v3, v0, v2

    .line 17
    invoke-virtual {v3}, Lcom/estrongs/android/pop/app/imageviewer/a$a;->a()V
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    add-int/lit8 v2, v2, 0x1

    goto :goto_0

    .line 18
    :cond_0
    monitor-exit p0

    return-void

    :catchall_0
    move-exception v0

    monitor-exit p0

    goto :goto_2

    :goto_1
    throw v0

    :goto_2
    goto :goto_1
.end method

.method public declared-synchronized a(Les/cm;Ljava/lang/ref/SoftReference;)V
    .locals 9
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Les/cm;",
            "Ljava/lang/ref/SoftReference<",
            "Lcom/estrongs/android/pop/app/imageviewer/h;",
            ">;)V"
        }
    .end annotation

    monitor-enter p0

    .line 6
    :try_start_0
    invoke-direct {p0, p1}, Lcom/estrongs/android/pop/app/imageviewer/a;->c(Les/cm;)Lcom/estrongs/android/pop/app/imageviewer/a$a;

    move-result-object v0
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    if-eqz v0, :cond_0

    .line 7
    monitor-exit p0

    return-void

    .line 8
    :cond_0
    :try_start_1
    iget-object v0, p0, Lcom/estrongs/android/pop/app/imageviewer/a;->a:Les/dm;

    invoke-interface {v0, p1}, Les/dm;->a(Les/cm;)I

    move-result v0

    const/4 v1, 0x0

    const/4 v2, -0x1

    .line 9
    iget-object v3, p0, Lcom/estrongs/android/pop/app/imageviewer/a;->b:[Lcom/estrongs/android/pop/app/imageviewer/a$a;

    array-length v4, v3

    const/4 v5, 0x0

    :goto_0
    if-ge v5, v4, :cond_3

    aget-object v6, v3, v5

    .line 10
    iget-object v7, v6, Lcom/estrongs/android/pop/app/imageviewer/a$a;->a:Les/cm;

    if-nez v7, :cond_1

    move-object v1, v6

    goto :goto_1

    .line 11
    :cond_1
    iget-object v7, p0, Lcom/estrongs/android/pop/app/imageviewer/a;->a:Les/dm;

    iget-object v8, v6, Lcom/estrongs/android/pop/app/imageviewer/a$a;->a:Les/cm;

    invoke-interface {v7, v8}, Les/dm;->a(Les/cm;)I

    move-result v7

    sub-int v7, v0, v7

    invoke-static {v7}, Ljava/lang/Math;->abs(I)I

    move-result v7

    if-le v7, v2, :cond_2

    move-object v1, v6

    move v2, v7

    :cond_2
    add-int/lit8 v5, v5, 0x1

    goto :goto_0

    .line 12
    :cond_3
    :goto_1
    invoke-virtual {v1}, Lcom/estrongs/android/pop/app/imageviewer/a$a;->a()V

    .line 13
    iput-object p1, v1, Lcom/estrongs/android/pop/app/imageviewer/a$a;->a:Les/cm;

    .line 14
    iput-object p2, v1, Lcom/estrongs/android/pop/app/imageviewer/a$a;->b:Ljava/lang/ref/SoftReference;
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    .line 15
    monitor-exit p0

    return-void

    :catchall_0
    move-exception p1

    monitor-exit p0

    goto :goto_3

    :goto_2
    throw p1

    :goto_3
    goto :goto_2
.end method

.method public declared-synchronized b(Les/cm;)V
    .locals 0

    monitor-enter p0

    .line 1
    :try_start_0
    invoke-direct {p0, p1}, Lcom/estrongs/android/pop/app/imageviewer/a;->c(Les/cm;)Lcom/estrongs/android/pop/app/imageviewer/a$a;

    move-result-object p1
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    if-nez p1, :cond_0

    .line 2
    monitor-exit p0

    return-void

    .line 3
    :cond_0
    :try_start_1
    invoke-virtual {p1}, Lcom/estrongs/android/pop/app/imageviewer/a$a;->a()V
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    .line 4
    monitor-exit p0

    return-void

    :catchall_0
    move-exception p1

    monitor-exit p0

    throw p1
.end method
